<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<%@include file="/views/common/include/taglib.jsp"%>
<%@include file="/views/common/include/head.jsp"%>
<link rel="stylesheet" href="${ctx}/css/page/header2.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/reset.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/ts-demo.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/footer.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/leftList.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/xqtz.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/page.css" type="text/css">
</head>
<style>
a {
cursor: pointer;
}
.form {
padding-top:40px;

}
.form table {
    margin: 10px auto;
    border-collapse: collapse;
    border-color:#B5B5B5;
}

.table-f th{
    background:#57B4C6;
    height:43px;
    color:#fff;
    font-size:14px;
    text-align:center;
    border:1px solid #ccc;
}

.table-f td{
    color:#7B7B7B;
    font-size:14px;
    height:93px;
    text-align:center;
    border:1px solid #ccc;
    
}
.pspace{
text-indent:173px;
}
</style>
<body>
    <jsp:include page="/views/common/head_main.jsp" />
    <div class="bg">
    <input type="hidden" id="item" value="${sessionScope.item_sugegstion}"/>
        <div class="contentbox contentbox1">
            <img src="${ctx}/images/tsjy/ts1.png">
            <div class="nav-list">  
                <ul>
                    <li><img src="${ctx}/images/wuye/wy2.png"/><a href="${ctx}/main?item=5" style="color:black">提交投诉建议</a><div class="bottom-box "></div></li>
                    <li><img src="${ctx}/images/wuye/wy3.png"/>我的投诉建议<div id="show-box" class="bottom-box "></div></li>
                </ul>
            </div>
            	<div class="content" >
            
				
               <c:forEach items="${complaintsInfo.list }" var="item" varStatus="itemStatus">
             
               <div id="copmlainCategory" class="form">
               <p class="pspace"><fmt:formatDate value="${item.createTime}"
                                                pattern="yyyy-MM-dd  HH:mm" /></p>
						<table class="table-f " >
							<thead>
								<tr class="">
									<th>标题</th>
									<th>类型</th>
									<th>内容</th>
									<th>状态</th>
								</tr>
							</thead>
                            <tbody>
                            
                            <tr class="text-c">
                                <td width="254px;">${item.title}</td>
                                <td width="130px;">
                                    <c:if test="${item.sugesstionType == 0 && item.complainType == 0 }">投诉平台</c:if>
                                    <c:if test="${item.sugesstionType == 0 && item.complainType == 1 }">投诉商户</c:if>
                                    <c:if test="${item.sugesstionType == 0 && item.complainType == 2}">投诉物业</c:if>
                                    <c:if test="${item.sugesstionType == 0 && item.complainType == 3}">向物业公司投诉</c:if>
                                    <c:if test="${item.sugesstionType == 1 && item.complainType == 0 }">平台建议</c:if>
                                    <c:if test="${item.sugesstionType == 1 && item.complainType == 2}">物业建议</c:if>
                                    <c:if test="${item.sugesstionType == 1 && item.complainType == 3}">向物业公司建议</c:if>
                                    <c:if test="${item.sugesstionType == 1 && item.complainType == 1 }">商户建议</c:if>
                                </td>
                                <td width="280px;">${item.content}</td>
                                <td width="185px;">
                                    <p><c:if test="${item.state == 0}">未回复</c:if>
                                    <c:if test="${item.state == 1}">已回复</c:if>
                                    <c:if test="${item.state == 2}">已评价</c:if></p>
                                    <p><a href="${ctx}/complaintsInfo/showDetails?id=${item.id}" style="color:red;">(查看详情)</a></p>
                                </td>
                            </tr>
                        </tbody>
			        </table>
					
                </div> 
                
                </c:forEach>
               
                  <div class="page">
                       <input id="pages" type="hidden" value="${complaintsInfo.pages}">
                            <ul>
                                <li><a class="last-page page-change " onclick="gotoPage(${currentPage-1 });">&lt;上一页</a></li>
                                <c:if test="${complaintsInfo.firstPage > 1}">
                                    <li onclick="gotoPage(1);"
                                        class="page-num"><a>1</a></li>
                                    <c:if test="${complaintsInfo.firstPage > 2}">
                                    ...
                                    </c:if>
                                </c:if>
                                <c:forEach items="${complaintsInfo.navigatepageNums }" var="page">
                                    <li onclick="gotoPage(${page});"
                                        class="<c:if test="${currentPage == page }">current</c:if>"
                                        class="page-num"><a>${page}</a></li>
                                </c:forEach>
                                <c:if test="${complaintsInfo.lastPage < complaintsInfo.pages}">
                                    <c:if test="${complaintsInfo.firstPage < complaintsInfo.pages - 1}">
                                    ...
                                    </c:if>
                                    <li onclick="gotoPage(${complaintsInfo.pages});"
                                        class="page-num"><a>${complaintsInfo.pages}</a>
                                    </li>
                                </c:if>
                                <li><a class="next-page page-change" onclick="gotoPage(${currentPage+1 });">下一页&gt;</a></li>
                            </ul>
                        </div>
            </div>
            
          
					
				</div>	
				
        </div>
<jsp:include page="/views/common/footer.jsp" />
<script src="${ctx}/js/controllers/suggestion/complaintsInfoEditController.js" type="text/javascript"></script>
<script type="text/javascript">
var ctx = '${ctx}';
setCtx(ctx);

//跳转到列表页面

function gotoPage(page) {
	var pages = $("#pages").val();
	if(page == null || page == 'undefined'){
		page = this.page;
	}
	if(page < 1 ){
		layer.msg("已到达第一页!", {
			time : 2000
		// 2秒关闭（如果不配置，默认是3秒）
		});
	} else if(page > pages && pages > 0){
		layer.msg("已到达最后一页!", {
			time : 1000
		// 2秒关闭（如果不配置，默认是3秒）
		});
	} else {
		window.location.href= ctx + "/complaintsInfo/infoList?pNo=" + page; 
	}
}

</script> 
<!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
<!-- <script src="/js/lib/jquery.JPlaceholder.js"></script> -->
</body>
</html>